Disable pytest-beartype-tests in nested collection runs to fix Python 3.14#3132
Merged
adamtheturtle merged 1 commit intomainfrom Apr 26, 2026
Merged
Disable pytest-beartype-tests in nested collection runs to fix Python 3.14#3132adamtheturtle merged 1 commit intomainfrom
adamtheturtle merged 1 commit intomainfrom
Conversation
Avoids beartype/beartype#637 which prevented ci/test_custom_linters.py from passing on Python 3.14. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ci/test_custom_linters.py) callspytest.main(--collect-only)in a loop. On Python 3.14 this crashed withTypeError: Cannot stringify annotation containing string formattingdue to an upstream beartype bug ([Bug]@beartype-decorated callables violate PEP 749-compliantannotationlib.Format.STRING, because this is the world we inhabit 🧔♀️ <-- what even *is* this emoji? a blond pacman ghost!? beartype/beartype#637) where thepytest-beartype-testsplugin installs a buggy__annotate_beartype__closure on test functions, which a subsequent nested collection then trips over viainspect.signature(..., annotation_format=Format.STRING).-p no:pytest_beartype_teststo both nestedpytest.maininvocations — type-checking adds no value for--collect-onlyruns anyway.Test plan
uv run --python=3.14 --all-extras pytest ci/test_custom_linters.pypasses (both linter tests, ~2.5 min)🤖 Generated with Claude Code
Note
Low Risk
Low risk: only adjusts CI linter test invocation flags to work around an upstream pytest plugin crash on Python 3.14, without changing production/runtime logic.
Overview
Updates
ci/test_custom_linters.pyto disable thepytest-beartype-testsplugin (-p no:pytest_beartype_tests) in both nestedpytest.main(--collect-only)runs.This prevents Python 3.14 nested test collection crashes caused by an upstream beartype/pytest plugin bug, while keeping the linter’s collection-only behavior unchanged.
Reviewed by Cursor Bugbot for commit ba140bb. Bugbot is set up for automated code reviews on this repo. Configure here.